package com.qf.vue2.exhandlers;

import com.qf.vue2.pojo.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)
    public R ex(Exception e){
        e.printStackTrace();

        return R.error("服务器忙，稍后重试~~");
    }
}
